<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动画</title>
  <style>
    /* 1.定义动画 */
    @keyframes move {

      /* 开始状态 */
      0% {
        transform: translate(0, 0);
      }

      /* 结束状态 */
      100% {
        transform: translate(500px, 500px);
      }
    }


    div {
      width: 200px;
      height: 200px;
      background-color: pink;
      /* 2.调用动画 */
      /* 动画名称 */
      /*animation-name: move;*/
      /* 持续时间 */
      /*animation-duration: 3s;*/
      /* 复合写法 */
      animation: move 3s linear 0.5s infinite alternate forwards;
    }
  </style>
</head>

<body>
<div></div>
</body>

</html>